load('Phantom_Data_2');
resolution = 2048;
XX = meshgrid(((1:resolution)-1-resolution/2)/resolution);
WW = sqrt(XX.^2+XX'.^2)<0.5;

M2K = 20*ones(2048).*WW;
for value = 30:5:90
    clear X Y;
    [X Y] = find(M==value);
    L = length(X);
    for ii = 1:L
        Xa = (X(ii)-1)*32+1; Xb = X(ii)*32;
        Ya = (Y(ii)-1)*32+1; Yb = Y(ii)*32;
        M2K(Xa:Xb,Ya:Yb) = value;
    end
end

R2K = 45*ones(2048);
R2K = R2K.*WW;
for value = 100:50:200
    clear X Y;
    [X Y] = find(R==value);
    L = length(X);
    for ii = 1:L
        Xa = (X(ii)-1)*32+1; Xb = X(ii)*32;
        Ya = (Y(ii)-1)*32+1; Yb = Y(ii)*32;
        R2K(Xa:Xb,Ya:Yb) = value;
    end
end

W2K = 30*ones(2048);
W2K = W2K.*WW;
clear WW;
WW = sqrt(XX.^2+XX'.^2)<0.2;
idx = find(WW);
W2K(idx) = 100;
clear idx;
WW(1:1024,:) = 0;
idx = find(WW);
W2K(idx) = 150;

clear XX value resolution Xa Xb Ya Yb X WW L Y ii idx jj idx
clear M omega